package com.iot.user.controller;

import com.iot.common.entity.MessageRequest;
import com.iot.user.feign.MessageFeignService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    private MessageFeignService messageFeignService;

    @RequestMapping("/hello")
    public String getUser(){
        MessageRequest messageRequest = new MessageRequest();
        messageRequest.setId(1);
        return messageFeignService.getMessage(messageRequest);
    }

}
